package cn.stylefeng.guns.modular.tao.service.impl;

import cn.stylefeng.guns.modular.tao.mapper.BackstageMemberMapper;
import cn.stylefeng.guns.modular.tao.service.BackstageMemberService;
import cn.stylefeng.guns.sys.modular.tao.entity.entityExtend.WxUserExtends;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BackstageMemberServiceImpl implements BackstageMemberService {

    @Autowired
    private BackstageMemberMapper backstageMemberMapper;

    /**
     * 查询会员
     * @param condtion
     * @return
     */
    @Override
    public ResponseData getMemberBycondition(String condtion) {
        ResponseData data = new ResponseData();
        try {
            List<WxUserExtends> memberList = backstageMemberMapper.getMemberBycondition(condtion);
            data.setData(memberList);
            data.setCode(200);
            data.setMessage("查询成功");
        } catch (Exception e) {
            data.setCode(500);
            data.setMessage("查询失败");
        }
        return data;
    }

    /**
     *
     */
}
